// const arrow = function (param){}

// const arrow = param => {}

const luke = {
    id: 2,
    say: function(){
        setTimeout(function(){
            console.log('id:', this.id)
        }, 50)
    },
    sayWithThis:function(){
        let that = this
        setTimeout(function(){
            console.log('id:', that.id)
        }, 500)
    },
    sayWithArrow:function(){
        setTimeout(() => {
            console.log('id:', this.id)
        }, 1500)
    },
    sayWithGlobal: ()=>{
        setTimeout(() => {
            console.log('id:', this.id)
        }, 2000)
    }
}
luke.say()
luke.sayWithThis()
luke.sayWithArrow()
luke.sayWithGlobal()

